package com.xinghen.ace.common.constant;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;

/**
 * @author xinghen
 * @ClassName: CommonConstants
 * @Package: com.xinghen.ace.common.constant
 * @Description 通用处理类
 * @create 2018-05-03 17:13
 */
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class CommonConstants {

    public static final String DEFAULT_CHARSET = "UTF-8";

    public static final String CHARSET_GBK = "GBK";

    public static final String RESOURCE_TYPE_MENU = "menu";

    public static final String RESOURCE_TYPE_BTN = "button";

    /*************错误码 开始***************/
    public static final Integer EX_USER_INVALID_CODE = 40101;

    public static final Integer EX_CLIENT_INVALID_CODE = 40301;

    public static final Integer EX_CLIENT_FORBIDDEN_CODE = 40331;

    public static final Integer EX_OTHER_CODE = 500;
    /*************错误码 结束***************/

    public static final String CONTEXT_KEY_USER_ID = "CURRENT_USER_ID";

    public static final String CONTEXT_KEY_USER_NAME = "CURRENT_USER_NAME";

    public static final String CONTEXT_KEY_NAME = "CURRENT_USER";

    public static final String CONTEXT_KEY_USER_TOKEN = "CURRENT_USER_TOKEN";

    public static final String JWT_KEY_USER_ID = "JWT_USER_ID";
    public static final String JWT_KEY_NAME = "JWT_NAME";


    /********************分页相关常量*******************/
    public static final String PAGE_KEY = "page";
    public static final String LIMIT_KEY = "limit";

}
